package com.songlanyun.modules.message.model;

import com.songlanyun.common.drive.ValueObject;
import com.songlanyun.common.enums.PrivateMessageConstant;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 售后消息模型
 */
@Data
public class RightsMessage implements ValueObject, IMessageBody {

    public RightsMessage() {
    }

    public RightsMessage(PrivateMessageConstant.RightsStatus rightsStatus, BigDecimal money, BigDecimal refundPoint,
                         Long orderId, Long rightsOrderId,
                         List<GoodsMessage> goods) {
        this.rightsStatus = rightsStatus;
        this.money = money;
        this.refundPoint = refundPoint;
        this.orderId = orderId;
        this.rightsOrderId = rightsOrderId;
        this.goods = goods;
    }

    /**
     * 售后状态
     * 0：商家同意维权，待买家发货
     * 1：商家拒绝维权
     * 2：商家已收货
     * 3：商家已退款
     * 4：商家发起自动退款
     */
    private PrivateMessageConstant.RightsStatus rightsStatus;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 售后金额
     */
    private BigDecimal money;

    /**
     * 售后金额
     */
    private BigDecimal refundPoint;

    /**
     * 维权订单ID
     */
    private Long rightsOrderId;

    /**
     * 商品
     */
    private List<GoodsMessage> goods;

}
